﻿<%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage<MvcApplication1.Daten.Benutzer>" %>
<%@ Import Namespace="MvcApplication1.Helpers" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>Neuen Benutzer anlegen</title>
    <style type="text/css">
            /* Farben für die Fehlermeldungen definieren*/
            .validation-summary-errors,
            .field-validation-error,
            .input-validation-error
            {
                color:Red;
            }
            .input-validation-error
            {
                border: 1px solid red;
            }
    </style>
</head>
<body>
    <h2>Neuen Datensatz anlegen</h2>
    <%= Html.ValidationSummary("Bitte korrieren Sie folgende Fehler:") %>
    <%
        // Formular anlegen
        using (Html.BeginForm())
        {
         %>
         <fieldset>
            <legend>Neuer Datensatz</legend>
            <%= Html.Encode(ModelMetadata.FromLambdaExpression<MvcApplication1.Daten.Benutzer, string>(Model => Model.Nachname, ViewData).DisplayName)%>
            <div><%= Html.LabelFor(Model => Model.Nachname)%></div>
            <div>
                <%= Html.TextBoxFor(feld => Model.Nachname)%>
                <%=Html.ValidationMessageFor(feld => Model.Nachname, "*")%>
            </div>&#160;
            <div><%= Html.LabelFor(feld=>Model.Vorname)%></div>
            <div>
                <%= Html.TextBoxFor(feld => Model.Vorname)%>
                <%=Html.ValidationMessageFor(feld => Model.Vorname, "*")%>
            </div>&#160;
            <div><%= Html.LabelFor(feld=>Model.Email)%></div>
            <div>
                <%= Html.TextBoxFor(feld => Model.Email)%>
                <%=Html.ValidationMessageFor(feld => Model.Email, "*")%>
            </div>&#160;
            <%--<div><input type="submit" value="Absenden" /></div>--%>
            <div><%= Html.SubmitButton("submit") %></div>
         </fieldset>
         <% 
        } %>
</body>
</html>
